package com.leisure.controllers;

import com.leisure.pojo.Result;
import com.leisure.pojo.TArticle;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * ClassName: ArticleController
 * Package: com.leisure.ArticleController
 * Description: article controller controls a series of the operation in the article
 *
 * @Author: MyLeisureLife
 * @Date: 2024/6/8:16:30:17 星期六
 */
@RestController
@RequestMapping("/article")
public class ArticleController {

    /**
     * get your own article list
     * @return article list
     */
    @GetMapping("/list")
    public Result<List<TArticle>> getArticleList(){
        List<TArticle> articles = new ArrayList<>();
        articles.add(new TArticle());

        return Result.success(articles);
    }
}
